package com.zoe.onelink.dubbo.autoconfigure;

import com.zoe.onelink.dubbo.provider.DefaultDubboI18nMessageProvider;
import com.zoe.onelink.dubbo.provider.DubboI18nMessageProvider;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2022</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: ruansheng
 * @date: 2022-04-21
 */
@Configuration(proxyBeanMethods = false)
public class OnelinkDubboAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(DubboI18nMessageProvider.class)
    @ConditionalOnClass(name = "com.zoe.onelink.core.util.LocaleResolverUtil")
    public DubboI18nMessageProvider dubboI18nMessageProvider() {
        return new DefaultDubboI18nMessageProvider();
    }

}
